package com.yk.filedownload;

import java.io.File;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.lang.reflect.Array;
import java.util.*;
import java.util.concurrent.LinkedBlockingQueue;

/**
 * Project Name:cykfiledownload
 * File Name:SimulationData
 * Package Name:com.yk.filedownload.downloader
 * Date:2017\12\12 0012
 * Author:dengtianjia
 * Description:
 * Copyright (c) 2017, 重庆云凯科技有限公司 All Rights Reserved.
 */

/**
 * 测试类
 */
public class SimulationData {

//"http://www.downza.cn/download?file=&newstime=1489026270&module=soft&id=12193&token=2429acc2e1bf09c2d1e81ee94c8e5815&isxzq=0&referer=http%3A%2F%2Fwww.downza.cn%2Fsoft%2F181667.html"
    static String urls =
            "http://scapp.eduwest.com/File/DownApp?id=0f6470a4-8937-4ded-89fd-1bbffb40fb7e"+
            "*cut-off-line*" +
            "https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-3.6.0-signed.msi"+
            "*cut-off-line*" +
            "http://wdl1.cache.wps.cn/wps/download/W.P.S.5559.20.2424.exe"+
            "*cut-off-line*" +
            "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1513071134742&di=49e00e3beef69c957558307c3e98a9d1&imgtype=0&src=http%3A%2F%2Fb.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F622762d0f703918f91c9fb0d5b3d269758eec4d9.jpg" +
            "*cut-off-line*" +
            "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1513071134741&di=2b1612f6152805f8a4ad6f14bbfff45c&imgtype=0&src=http%3A%2F%2Fh.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fc75c10385343fbf2dd4279e4ba7eca8064388f8f.jpg" +
            "*cut-off-line*" +
            "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1513071134050&di=1172dee8ec963193ede086b0c2cfdb50&imgtype=0&src=http%3A%2F%2Fc.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F8d5494eef01f3a2927cb621c9325bc315d607ce4.jpg" +
            "*cut-off-line*" +
            "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1513071487890&di=08c1d32485dfd28c0852f5d054605a7c&imgtype=0&src=http%3A%2F%2Fpic19.nipic.com%2F20120222%2F8310292_140506698000_2.jpg" +
            "*cut-off-line*" +
            "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1513071487890&di=f303e6f7fe452156d3d7bcc5fbb2b28b&imgtype=0&src=http%3A%2F%2Fpic17.nipic.com%2F20111015%2F4695500_224140299162_2.jpg" +
            "*cut-off-line*" +
            "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1513071487890&di=aeb870948f14ae182b5dfb2cc9c76842&imgtype=0&src=http%3A%2F%2Fpic4.nipic.com%2F20090807%2F3019384_125938093_2.jpg" +
            "*cut-off-line*" +
            "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1513071487883&di=99ca606209e6f9c7d80c7cc5105ace46&imgtype=0&src=http%3A%2F%2Fpic9.nipic.com%2F20100916%2F668573_153403045371_2.jpg" +
            "*cut-off-line*" +
            "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1513071487881&di=de9de593c36b0579bc0cf7431f852bb8&imgtype=0&src=http%3A%2F%2Fpic45.nipic.com%2F20140804%2F18875271_100421733000_2.jpg";

    public static LinkedList<String> simulatData = new LinkedList<>();

    public static StringBuffer buffer = new StringBuffer();

    static {
        String[] urlarr = urls.split("\\*cut-off-line\\*");
        Collections.addAll(simulatData,urlarr);
    }

    public static void simulaHeaderout(String head) throws Exception{
        File file = new File("H:/test/headers.txt");
        PrintStream ps = new PrintStream(new FileOutputStream(file));
        buffer.append(head );
        buffer.append("\n");
        ps.append(buffer.toString());
    }

}
